package com.baseframe.score.sign;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ScoreChangeType {
    increase(1,"增加"),
    dwindle(2,"减少")
    ;

    private final int code;
    private final String name;


    public static ScoreChangeType getChangeType(Integer code){

        ScoreChangeType changeType = null;

        for (ScoreChangeType value : values()) {
            if (value.getCode()==code){
                changeType = value;
                break;
            }
        }
        return changeType;
    }
}
